package com.luping.xiao.xiao.controller;

import com.luping.xiao.xiao.domain.TRPassengerFlow;
import com.luping.xiao.xiao.service.TRPassengerFlowService;
import com.luping.xiao.xiao.utils.controller.BaseController;
import com.luping.xiao.xiao.utils.demoin.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class GpsdbtRPassengerflowController extends BaseController {

    @Autowired
    private TRPassengerFlowService trPassengerFlowService;

    @RequestMapping("gpstrp")
    @ResponseBody
    public AjaxResult gpstrp(String d, String t) throws Exception {
        TRPassengerFlow flow = new TRPassengerFlow();
        try {
            flow.setDateS(d + " 00:00:00");
            flow.setDateE(d + " 23:59:59");
            flow.setOct(t);
            flow.setSert(t);
            trPassengerFlowService.queryList(flow);
        } catch (Exception e) {
            e.printStackTrace();
            return error();
        }
        return success();
    }

}
